#include "Input.hpp"
#include "LevelGrid.hpp"
#include "Projectile.hpp"
#include "TestArrow.hpp"
#include "TowerDefense.hpp"

void TowerDefense::_UpdateScene(float dt)
{
	Projectile::UpdateAllProjectiles(dt);

	if(_input->LeftClick())
	{
		Vector arrow_position(_test_arrow->GetPosition());
		Vector arrow_to_cursor(_input->GetMousePosition() - arrow_position);
		Projectile(arrow_position, arrow_to_cursor, 512.0f);

		_level_grid->PlaceTowerAtLocation(_input->GetMousePosition());
	}
}